Skip to main content

CHelper Functions

CHelper

Overview

The CHelper is an object that contains a group of functions used to perform operations or get information about non-contextualized information. Non-contextualized means that these functions are not necessarily related to the case or BPMN element where the rule is executed. So you can operate two numbers, or get information from other elements in the project.

See our Bizagi Business Rules API

The following table contains the different functions you can find within the CHelper object.

FUNCTIONDESCRIPTIONSYNTAX
Cancel ProcessCancel cases and those related to them (sibling, child and parent cases).CHelper.abortProcess(Me, CaseId, AbortOption, AbortReason)
Concatenate documents from files arrayConcatenates documents from a files array into a PDF document or a Word document according to the selected function.CHelper.ConcatDocumentsFromFilesArrayToPDF(filesArray) / CHelper.ConcatDocumentsFromFilesArrayToWord(filesArray)
Concatenate documents from two XPathsConcatenates documents from two different XPaths into a PDF document or a Word document according to the selected function.CHelper.ConcatDocumentsFromTwoXpathsToPDF(Me, Xpath1, Xpath2) / CHelper.ConcatDocumentsFromTwoXpathsToWord(Me, Xpath1, Xpath2)
Concatenate documents from XPathConcatenates documents from an XPath into a PDF document or a Word document according to the selected function.CHelper.ConcatDocumentsFromXpathFileToPDF(Me, XPath) / CHelper.ConcatDocumentsFromXpathFileToWord(Me, XPath)
Convert a date from user time zone to server time zoneReturns a date time attribute converted from a user time zone, for example UTC - 5, to the server time zone where the project runs for example UTC.ConvertUserTimetoServerTime(UserId,Date)
CountCounts the number of elements of an Entity.CHelper.entityListCount(String entityName, String filter)
Get Assigned WorkItemsReturns all the WorkItems that have an active allocation to a given user.CHelper.getAssignedWorkItems(Me, CaseId, CurrentAsigneeId, IncludeSubProcesses)
Get attributeReturns the value of a given attribute of a specific record in an entity.CHelper.getAttrib(sEntityName, oEntityKey, sAttribName)
Get BooleanReturns true if the parameter equals 1 or true, false otherwise.CHelper.getBoolean(value)
Obtain case objectReturns the case object without the need of context.CHelper.getCaseById(CaseId)
Get case usersObtains the users that have worked on a case.CHelper.getCaseUsers(CaseNumber)
Get current time for userObtains the current user's time.CHelper.GetCurrentTimeForUser(idUser)
Get effective durationReturns the time difference, in minutes, considering only working days.CHelper.getEffectiveDuration(Me, Start, End)
Get effective duration for userReturns the time difference, in minutes, considering only working days for the specified user.CHelper.getEffectiveDurationForUser(idUser, Start, End)
Get entity attributeObtains a value from an Entity not related to the Data Model.CHelper.getEntityAttrib(Entity, ValueToReturn, filter, filterParameters)
Get estimated dateReturns a date given an initial date and a period of time, considering the Working Time Schema.CHelper.getEstimatedDate(Me, dtFromDate, iDuration)
Get estimated date for userReturns a date given user id, a start date and a number of minutes.CHelper.getEstimatedDateForUser(idUser, dtFromDate, iDuration)
Get estimated date from user date timeCalculates a date considering the time schema and user timezone.CHelper.getEstimatedDateFromUserDateTime(UserId,iDuration)
Get localized valueReturns the value of a localized entity attribute using the current user's language.CHelper.GetLocalizedValue(EntityName, AttribName, SurrogateKeyValue)
Get next sequence valueObtains the next value of a sequence.CHelper.GetNextSeqValueStr("SequenceName")
Get parameter valueObtains the value of a custom parameter.CHelper.getParameterValue(parameterName)
Get parent process IdRetrieves the parent identifier of a child process, without the need of context.CHelper.getParentProcessId(caseId, wfclassName)
Get sibling processes' IdObtains the identifiers of the sibling Processes (Sub-Processes with the same parent Process) of a specific Process.CHelper.getSiblingProcessesId(Me, WfClassName)
Get Solution dateReturns a date given an initial date and a period of time, considering the Working Time Schema and holidays.CHelper.getSolutionDate(Me, dtFromDate, iDuration)
Get solution date for userReturns a date given user id, a start date and a number of minutes, it considers the user's Working Time Schema and holidays.CHelper.getSolutionDateForUser(idUser, dtFromDate, iDuration)
Get String ExtendedRetrieves the value stored in an Extended object.CHelper.GetStringExtended("ExtendedObjectName", Default value, Culture)
Get Sub-Processes' IdObtains the identifier of all child processes.CHelper.getSubProcessesId(Me)
Get given Sub-Processes' IdObtains the identifier of all the given child processes.CHelper.getSubProcessesId(Me, WfClassName)
Get users for PositionObtains a list of the users who hold a certain Position within the organization.CHelper.getUsersForPosition(posName)
Get filtered users for positionObtains a list of the active users who hold a certain Position within the organization, if the "filterActive" parameter is true.CHelper.getUsersForPosition(posName, filterActive)
Get users for roleObtains a list of the users who hold a certain Role within the organization.CHelper.getUsersForRole(roleName)
Get filtered users for roleObtains a list of the active users who hold a certain Role within the organization, if the parameter is true.CHelper.getUsersForRole(roleName, filterActive)
Get users for skillObtains a list of the users who have a certain Skill within the organization.CHelper.getUsersForSkill(skillName)
Get filtered users for skillObtains a list of the active users who have a certain Skill within the organization, if the parameter is true.CHelper.getUsersForSkill(skillName, filterActive)
Get users by StakeholderObtain all users given a Stakeholder.CHelper.GetUsersForStakeholder("StakeholderName")
Get XSDObtains a predefined schema for any entity, as configured in Bizagi Studio.CHelper.getXSD(entityName, xsdName)
Get XSLObtains a predefined transformation file that you registered for any entity, as configured in Bizagi Studio.CHelper.getXSL(entityName, xslName)
Grant case accessGrants the given user, access to the given case.CHelper.GrantCaseAccess(idCase, idUser)
Is emptyReturns true if the object specified as parameter is empty or null; otherwise, returns false.CHelper.IsEmpty(Variable)
Is nullReturns true if the object specified as parameter is null; otherwise, returns false.CHelper.IsNull(Variable)
Is working dayVerifies if a Date is a Working day.CHelper.IsWorkingDay(Me,Date)
Is working day for userVerifies if a Date is a Working day for a specific user.CHelper.IsWorkingDayForUser(idUser, Date)
Is working hourReturns true if a specific date falls under the organization's working time schema; otherwise, it returns false.CHelper.IsWorkingMinute(Me, Date)
Is working hour for userReturns true if a specific date falls under the given user's working time schema; otherwise, it returns false.CHelper.IsWorkingMinuteForUser(idUser, Date)
Get the next assigned user by loadReturns the id of the next user available for assignment by load.CHelper.LoadAssig(AssigneeList, Me)
New caseCreates a new case with the creator user defined.CHelper.NewCase(idUser,WFClassName)
New case with business informationCreates a new case based on the information provided in the input parameter (string XML).CHelper.NewCase(XML)
Perform activityExecutes an activity, it's the equivalent of pressing the NEXT button.CHelper.PerformActivity(XML_ActivityInfo)
Raise cancel intermediate eventRaises a cancellation and adds a cancellation log file in the project folder.CHelper.RaiseCancelIntermediateEvent(message)
Raise error intermediate eventInterrupts the current activity and deviates the normal path towards the error path. This function will add an error log file in the project folder.CHelper.RaiseErrorIntermediateEvent(message)
Raise cancel end eventInterrupts the transactional Sub-Process and deviates the normal path towards the cancel path.CHelper.RaiseCancelEndEvent(message)
Raise error end eventInterrupts the transactional Sub-Process and deviates the normal path towards the error path.CHelper.RaiseErrorEndEvent(message)
Resolve VocabularyObtains the value stored in a specific Vocabulary.CHelper.resolveVocabulary(Me, VocabularyName)
Get the next assigned user by sequenceReturns the id of the next user available for assignment by sequence.CHelper.SecuentialAssig(AssigneeList, Me)
Set attributeModifies specific attributes values from specific records of an entity.CHelper.setAttrib(sEntityName, oEntityKey, sAttribName, oAttribValue)
Execute eventExecutes an available intermediate Event in Bizagi, which has no specific type defined.CHelper.setEvent(Me, Caseid, eventName, null) / CHelper.setEvent(xml)
Evaluate if there are open processesEvaluates if cases are open for a specific case creation number.CHelper.thereAreOpenProcesses(CaseNumber)
Evaluate if there are open processesEvaluates if cases are open for a specific case creation number and WfClassName.CHelper.thereAreOpenProcesses(caseNumber, wfclassName)
Throw validation errorDisplays an error message on the Work Portal.CHelper.ThrowValidationError(message)
Throw validation alertDisplays a customized alert message on the Work Portal.CHelper.ThrowValidationAlert(message)
To base64Converts files to base64.CHelper.ToBase64(data)
To IntegerConverts a string to Integer.CHelper.ToInt(sText)
TraceLogs the user-defined traces which are manually included in Business Rules.CHelper.trace(sFileName, sText)
Update ECM metadataMaps business information into a document to be stored at the ECM.CHelper.UpdateECMMetadata(Me, data, XPath)
Force attribute to deployForces Bizagi to include attributes that are not included in a deployment.CHelper.usingXPath(xpath) / CHelper.usingXPath(EntityName, xpath)